'use strict';

function transDate(myTime) {
  var date = new Date(parseInt(myTime));
  var year = date.getFullYear();
  var month = date.getMonth() + 1;
  var myDate = date.getDate();
  var hours = date.getHours();
  var minutes = date.getMinutes();
  var seconds = date.getSeconds();
  var time = year + '/' + month + '/' + myDate + ' ' + hours + ':' + minutes + ':' + seconds;
  var transDate = {
    year: year,
    month: month,
    date: myDate,
    hours: hours,
    minutes: minutes,
    seconds: seconds,
    time: time
  }
  return transDate;
}
module.exports = transDate;